Ternary 三元運算子


Posted by Rich on 2021-04-22

console.log(10 > 5 ? 'bigger' : 'smaller')
output:bigger

condition ? true : false
條件 ? true就執行 : false就執行


#note







Related Posts

Day 22-Pong Game

Day 22-Pong Game

Oracle中文數字排序

Oracle中文數字排序

完成 week6 切版新拖延運動表單!~

完成 week6 切版新拖延運動表單!~


Comments